//
//  HomeMeTableViewCell.m
//  TQY
//
//  Created by 甘世清 on 2024/12/4.
//

#import "HomeMeTableViewCell.h"

@implementation HomeMeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)SQ_Style:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self.contentView.backgroundColor = UIColor.clearColor;
    UIView * bgView = [[UIView alloc]init];
    bgView.backgroundColor = UIColor.whiteColor;
    [self.contentView addSubview:bgView];
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 12, 0, 12));
    }];
    
    UIImageView * rightImage = [[UIImageView alloc]init];
    rightImage.image = SQGetImage(@"返回");
    [bgView addSubview:rightImage];
    [rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(bgView);
            make.size.mas_equalTo(16);
            make.right.equalTo(bgView.mas_right).offset(-10);
    }];
    [bgView addSubview:self.leftImageView];
    [self.leftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(bgView);
            make.size.mas_equalTo(20);
            make.left.equalTo(bgView).offset(20);
    }];
    
    [bgView addSubview:self.nameLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(bgView);
            make.left.equalTo(bgView).offset(56);
    }];
}
- (UIImageView *)leftImageView{
    if (!_leftImageView) {
        _leftImageView = [[UIImageView alloc]init];
    }
    return _leftImageView;
}
- (UILabel *)nameLabel{
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = FONT_REGULAR(16);
        _nameLabel.textColor = SQColor333333;
    }
    return _nameLabel;
}
@end
